-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Create an abstraction layer for the database #407
base: master
Are you sure you want to change the base?
WIP: Create an abstraction layer for the database #407
Conversation
Codecov Report
@@ Coverage Diff @@
## master #407 +/- ##
===========================================
- Coverage 0.87% 0.62% -0.25%
- Complexity 436 600 +164
===========================================
Files 14 30 +16
Lines 1375 1914 +539
===========================================
Hits 12 12
- Misses 1363 1902 +539
Flags with carried forward coverage won't be shown. Click here to find out more.
|
* @param CategoryEntity $category The entity to store | ||
*/ | ||
public function store(CategoryEntity $category): void { | ||
// We do not need to store anything here. The categories are just virtually generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about creating categories as actual objects that can have, e.g., a description or other metadata? 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply put: No. 😁
The current DB schema has only a category name stored in a mapping type table. I kept with that for now. See also #300.
I was planning to proceed as follows:
- Create the entities and a DB abstraction layer parallel to the current main work.
- Deprecate major parts of the current RecipeDbService and refactor the DbCacheService that use direct DB operations.
- Migrate and refactor any current usage of any of these methods in the codebase
- Migrate any pending PRs to the new system
- Remove the direct DB access
After the DB access has been encapsulated as described here, we can add further setter/getter and fields in the DB without affecting the functionality of other parts.
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
…able Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
Signed-off-by: Christian Wolf <[email protected]>
3f05957
to
4083e95
Compare
To allow for simpler development and future implemntation, this PR provides an internal API to the database.
It is related to #301.
Currently this PR is under development and should be considered Work in Progress. Suggestions and enhancements are welcome.